<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<tpl> $NCharset </tpl>" />
<link href="<tpl> $template_dir </tpl>/member/css/layout.css" rel="stylesheet" type="text/css" />
<tpl>
include file ='../head.config.html'</tpl>
<script type="text/javascript">
$(document).ready(function() {
	$("#form_product").validate({
		errorClass: "wrong",
		rules: {
		},
		messages: {
		},
		submitHandler: function() {
			sign = true;//
			i=0;
			$("#form_product input[@type=checkbox]").each(function(){
				if(this.checked == true){
					//商品名称
					if($('#p_name_'+i).val() == ''){
						sign = false;
						$('#p_name_'+i).focus();
						alert('<tpl> $errBatchPnameIsEmpty </tpl>');
						return false;
					}
					//
					if($('#p_info_'+i).val() == ''){
						sign = false;
						$('#p_info_'+i).focus();
						alert('<tpl> $errBatchPinfoIsEmpty </tpl>');
						return false;
					}
					//
					if($('#p_storage_'+i).val() == ''){
						sign = false;
						$('#p_storage_'+i).focus();
						alert('<tpl> $errBatchPstorageIsEmpty </tpl>');
						return false;
					}
					//
					if($('#p_price_'+i).val() == ''){
						sign = false;
						$('#p_price_'+i).focus();
						alert('<tpl> $errBatchPpriceIsEmpty </tpl>');
						return false;
					}
				}
				i++;
			});
			if(sign){
				$('#form_product').ajaxSubmit(options);
			}
		}
	});
});
</script>
</head>
<body><tpl>include file ='../header.html'</tpl> 

<div id="container761">
  <div class="own_member_main">
 <tpl>include file ='own_menu.html'</tpl>
  <div class="member_right">
<div class="new_main_left">
	<div class="new_main_left1">
		<h1 class="new_text"><tpl> $langBatchProduct </tpl></h1>
    	<i></i>
	</div>
	<b></b>
</div>
<div id="own_main_rightop"><tpl> $langBatchProduct </tpl></div>
	<div id="own_main_rightop_line" style="margin-top:-3px;">
	  <b class="b4"></b>
	  <b class="b3"></b>
	  <b class="b2"></b>
	  <b class="b1"></b>
	  </div>
    <form action="own_product_batch.php?action=upload_in" method="post" name="form_product" id="form_product">
		<input type="hidden" name="pay_method" id="pay_method" value="<tpl> $condition.pay_method </tpl>" />
		<input type="hidden" name="p_currency_category" id="p_currency_category" value="<tpl> $condition.p_currency_category </tpl>" />
		<input type="hidden" name="searchcate" id="searchcate" value="<tpl> $condition.searchcate </tpl>" />
		<input type="hidden" name="shop_product_category" id="shop_product_category" value="<tpl> $condition.shop_product_category|default:'0' </tpl>" />
		<input type="hidden" name="area_id" id="area_id" value="<tpl> $condition.area_id </tpl>" />
		
      <table border="1" cellpadding="0" cellspacing="0" bordercolor="#DDE0E3" style="overflow:visible; margin-top:10px" >
	  	<tr><td colspan="10"></td></tr>
        <tr class="tr_FAFAFA">
		  <th align="center" valign="middle"><tpl> $langBatchSel </tpl></th>
          <th align="center" valign="middle"><tpl> $langBatchProductName </tpl></th>
          <th align="center" valign="middle"><tpl> $langBatchProductInfo </tpl></th>
          <th align="center" valign="middle"><tpl> $langBatchProductStorage </tpl></th>
          <th align="center" valign="middle"><tpl> $langBatchProductPrice </tpl></th>
          <th align="center" valign="middle"><tpl> $langBatchProductType </tpl><br /><tpl> $langBatchProductSellType </tpl></th>
          <th align="center" valign="middle"><tpl> $langBatchProductOther </tpl></th>
        </tr>
        <tpl> section name=loop loop=$product_array </tpl>
        <tr class="tr_dotted">
		  <td align="center" valign="middle"><input type="checkbox" name="chboxPid[<tpl> $smarty.section.loop.rownum-1 </tpl>]" checked="checked" value="<tpl> $smarty.section.loop.rownum-1 </tpl>" /></td>
          <td align="center" valign="middle"><input type="text" name="p_name[]" id="p_name_<tpl> $smarty.section.loop.rownum-1 </tpl>" value="<tpl> $product_array[loop].p_name </tpl>" /></td>
          <td align="center" valign="middle"><input type="text" name="p_info[]" id="p_info_<tpl> $smarty.section.loop.rownum-1 </tpl>" value="<tpl> $product_array[loop].p_info </tpl>" /></td>
          <td align="center" valign="middle"><input type="text" name="p_storage[]" id="p_storage_<tpl> $smarty.section.loop.rownum-1 </tpl>" value="<tpl> $product_array[loop].p_storage </tpl>" size="5" /></td>
          <td align="center" valign="middle"><input type="text" name="p_price[]" id="p_price_<tpl> $smarty.section.loop.rownum-1 </tpl>" value="<tpl> $product_array[loop].p_price </tpl>" size="5" /></td>
          <td align="center" valign="middle">
		  	<tpl> if $product_array[loop].radioType eq '0' </tpl>
			<tpl> $langBatchProductTypeZero </tpl>
			<tpl> /if </tpl>
			<tpl> if $product_array[loop].radioType eq '1' </tpl>
			<tpl> $langBatchProductTypeOne </tpl>
			<tpl> /if </tpl>
			<tpl> if $product_array[loop].radioType eq '2' </tpl>
			<tpl> $langBatchProductTypeTwo </tpl>
			<tpl> /if </tpl>
			<br />
			<tpl> if $product_array[loop].radioSelltype eq '0' </tpl>
			<tpl> $langBatchProductSellTypeZero </tpl>
			<tpl> /if </tpl>
			<tpl> if $product_array[loop].radioSelltype eq '1' </tpl>
			<tpl> $langBatchProductSellTypeOne </tpl>
			<tpl> /if </tpl>
			<tpl> if $product_array[loop].radioSelltype eq '2' </tpl>
			<tpl> $langBatchProductSellTypeTwo </tpl>
			<tpl> /if </tpl>
		  </td>
          <td align="center" valign="middle">
		  	<tpl> if $product_array[loop].radioTransfee eq '0' </tpl>
				<tpl> $langBatchProductTransfeeChargeOne </tpl>
			<tpl> else </tpl>
				<tpl> $langBatchProductTransfeeChargeTwo </tpl>
				<tpl> if $product_array[loop].pyTF neq 0 </tpl>
				<br />
				<tpl> $langBatchProductTransfeePY </tpl>：<tpl> $product_array[loop].pyTF </tpl>
				<tpl> /if </tpl>
				<tpl> if $product_array[loop].emsTF neq 0 </tpl>
				<br />
				<tpl> $langBatchProductTransfeeEMS </tpl>：<tpl> $product_array[loop].emsTF </tpl>
				<tpl> /if </tpl>
				<tpl> if $product_array[loop].kdTF neq 0 </tpl>
				<br />
				<tpl> $langBatchProductTransfeeKD </tpl>：<tpl> $product_array[loop].kdTF </tpl>
				<tpl> /if </tpl>
			<tpl> /if </tpl>
		  </td>
        </tr>
		<!--   start 商品参数  -->
		<input type="hidden" name="system_step[]" value="<tpl> $product_array[loop].system_step </tpl>" />
		<input type="hidden" name="price_step[]" value="<tpl> $product_array[loop].price_step </tpl>" />
		<input type="hidden" name="group_price[]" value="<tpl> $product_array[loop].group_price </tpl>" />
		<input type="hidden" name="group_mincount[]" value="<tpl> $product_array[loop].group_mincount </tpl>" />
		<input type="hidden" name="radioTransfee[]" value="<tpl> $product_array[loop].radioTransfee </tpl>" />
		<input type="hidden" name="pyTF[]" value="<tpl> $product_array[loop].pyTF </tpl>" />
		<input type="hidden" name="emsTF[]" value="<tpl> $product_array[loop].emsTF </tpl>" />
		<input type="hidden" name="kdTF[]" value="<tpl> $product_array[loop].kdTF </tpl>" />
		<input type="hidden" name="radioType[]" value="<tpl> $product_array[loop].radioType </tpl>" />
		<input type="hidden" name="radioSelltype[]" value="<tpl> $product_array[loop].radioSelltype </tpl>" />
		<input type="hidden" name="invoices[]" value="<tpl> $product_array[loop].invoices </tpl>" />
		<input type="hidden" name="warranty[]" value="<tpl> $product_array[loop].warranty </tpl>" />
		<!--  end 商品参数   -->
        <tpl> /section </tpl>
		<div style="clear:both"></div>
      </table>
		<div style="clear:both"></div>
		<div style="background:#F3F3F3; padding:5px 10px 0px 10px; text-align:left; height:25px">
		<input name="negative" type="submit" id="negative" class="new_anniu" value="<tpl> $langBatchSubmit </tpl>" />
		<div style="clear:both"></div>
		</div>
    </form>
		 <div style="clear:both"></div>
  </div>
   <div style="clear:both"></div>
  </div> <tpl> include file ='../../../html/footer.html' </tpl>
  </div>
</body>
</html>